package com.cmower.dzone.trycatchfinally;

import java.io.*;
import java.net.URLDecoder;
import java.util.Scanner;

public class Trywithresources {
    public static void main(String[] args) {
        String path = Trywithresources.class.getResource("/牛逼.txt").getFile();
        String decodePath = null;
        try {
            decodePath = URLDecoder.decode(path, "utf-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
try (BufferedReader br = new BufferedReader(new FileReader(decodePath));) {
    String str = null;
    while ((str =br.readLine()) != null) {
        System.out.println(str);
    }
} catch (IOException e) {
    e.printStackTrace();
}
    }
}
